﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class UnityEnginePlayablesAnimationPlayableUtilitiesWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(UnityEngine.Playables.AnimationPlayableUtilities);
			Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
			
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 6, 0, 0);
			Utils.RegisterFunc(L, Utils.CLS_IDX, "Play", _m_Play_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "PlayClip", _m_PlayClip_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "PlayMixer", _m_PlayMixer_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "PlayLayerMixer", _m_PlayLayerMixer_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "PlayAnimatorController", _m_PlayAnimatorController_xlua_st_);
            
			
            
			
			
			
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "UnityEngine.Playables.AnimationPlayableUtilities does not have a constructor!");
        }
        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Play_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    UnityEngine.Animator _animator = (UnityEngine.Animator)translator.GetObject(L, 1, typeof(UnityEngine.Animator));
                    UnityEngine.Playables.Playable _playable;translator.Get(L, 2, out _playable);
                    UnityEngine.Playables.PlayableGraph _graph;translator.Get(L, 3, out _graph);
                    
                    UnityEngine.Playables.AnimationPlayableUtilities.Play( _animator, _playable, _graph );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_PlayClip_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    UnityEngine.Animator _animator = (UnityEngine.Animator)translator.GetObject(L, 1, typeof(UnityEngine.Animator));
                    UnityEngine.AnimationClip _clip = (UnityEngine.AnimationClip)translator.GetObject(L, 2, typeof(UnityEngine.AnimationClip));
                    UnityEngine.Playables.PlayableGraph _graph;
                    
                        var gen_ret = UnityEngine.Playables.AnimationPlayableUtilities.PlayClip( _animator, _clip, out _graph );
                        translator.Push(L, gen_ret);
                    translator.Push(L, _graph);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_PlayMixer_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    UnityEngine.Animator _animator = (UnityEngine.Animator)translator.GetObject(L, 1, typeof(UnityEngine.Animator));
                    int _inputCount = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Playables.PlayableGraph _graph;
                    
                        var gen_ret = UnityEngine.Playables.AnimationPlayableUtilities.PlayMixer( _animator, _inputCount, out _graph );
                        translator.Push(L, gen_ret);
                    translator.Push(L, _graph);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_PlayLayerMixer_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    UnityEngine.Animator _animator = (UnityEngine.Animator)translator.GetObject(L, 1, typeof(UnityEngine.Animator));
                    int _inputCount = LuaAPI.xlua_tointeger(L, 2);
                    UnityEngine.Playables.PlayableGraph _graph;
                    
                        var gen_ret = UnityEngine.Playables.AnimationPlayableUtilities.PlayLayerMixer( _animator, _inputCount, out _graph );
                        translator.Push(L, gen_ret);
                    translator.Push(L, _graph);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_PlayAnimatorController_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    UnityEngine.Animator _animator = (UnityEngine.Animator)translator.GetObject(L, 1, typeof(UnityEngine.Animator));
                    UnityEngine.RuntimeAnimatorController _controller = (UnityEngine.RuntimeAnimatorController)translator.GetObject(L, 2, typeof(UnityEngine.RuntimeAnimatorController));
                    UnityEngine.Playables.PlayableGraph _graph;
                    
                        var gen_ret = UnityEngine.Playables.AnimationPlayableUtilities.PlayAnimatorController( _animator, _controller, out _graph );
                        translator.Push(L, gen_ret);
                    translator.Push(L, _graph);
                        
                    
                    
                    
                    return 2;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            
        }
        
        
        
        
        
        
		
		
		
		
    }
}
